<!DOCTYPE HTML>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>外边距</title>
    <style type="text/css">
        div{
            width:300px;
            height:300px;
            border:10px solid red;
        }
        #box1{margin-bottom:30px;
            margin-left:30px;
        }
    </style>
</head>
<body>
<div id="box1">box1</div>
<div id="box2">box2</div>
</body>
</html>